<table id="toc" class="toc" width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr valign="top">
        <td class="menu">
            <div id="toctitle">
                <div style="float: right;">
                    <a href="/project/{$project->name}/docs/todo">Todo List</a>
                </div>
            <h2>Contents</h2>
            </div>
    
            {if count($ric) >= 1}
            <div id="ric">
                {section name=ric loop=$ric}
                    <p><a href="{$subdir}{$ric[ric].file}">{$ric[ric].name}</a></p>
                {/section}
            </div>
            {/if}

            {* <h5>Packages</h5>*}
            <ul class="menu">
            {*section name=packagelist loop=$packageindex}
            <li class="package"><a href="{$subdir}{$packageindex[packagelist].link}">{$packageindex[packagelist].title}</a></li>
            {/section*}
            </ul>

            <div class="ddmenu">{$package->name|default:'Выберите пакет'}<span class="downarr"></span>
                <div class="ddmenu-w" style="left: 10px">
                    <table>
                    {foreach from=$tree key=key item=item}
                    {include file="elements/doctree.tpl" key=$key tree=$item}
                    {/foreach}
                    </table>
                </div>
            </div>

            {if $tutorials}
            <h5>Tutorials/Manuals</h5>

            {if $tutorials.pkg}
                <strong>Package-level:</strong>
                {section name=ext loop=$tutorials.pkg}
                    {$tutorials.pkg[ext]}
                {/section}
            {/if}
            {if $tutorials.cls}
                <strong>Class-level:</strong>
                {section name=ext loop=$tutorials.cls}
                    {$tutorials.cls[ext]}
                {/section}
            {/if}
            {if $tutorials.proc}
                <strong>Procedural-level:</strong>
                {section name=ext loop=$tutorials.proc}
                    {$tutorials.proc[ext]}
                {/section}
            {/if}
            {/if}

            {if $package}
            <h5>Classes</h5>
            <ul class="menu">
            {foreach from=$classInfo.classes item="cls"}
				{if $cls->is_abstract}
                <li class="abstract-class">
                {else}
                <li class="class">
                {/if}
                <a href="/project/bazalt/docs/class/{$cls->name}">{$cls->name}</a></li>
            {/foreach}
            </ul>            
            {foreach from=$classInfo.subpackages item="subpckg" key="subpckgName"}
                <h5>{$subpckgName}</h5>
                <ul class="menu" style="margin-left: 20px">
                {foreach from=$subpckg item="cls"}
                    {if $cls->is_abstract}
                    <li class="abstract-class">
                    {else}
                    <li class="class">
                    {/if}
                    <a href="/project/bazalt/docs/class/{$cls->name}">{$cls->name}</a></li>
                {/foreach}
                </ul>             
            {/foreach}
            {if $classInfo.interfaces|@count > 0}
            <h5>Interfaces</h5>
            <ul class="menu" style="margin-left: 0px">
            {foreach from=$classInfo.interfaces item="interface"}                
                <li class="interface">
                    <a href="/project/bazalt/docs/class/{$interface->name}">{$interface->name}</a>
                </li>
            {/foreach}
            </ul>
            {/if}
            {/if}
        </td>
    </tr>
</table>